package com.sharyuke.app.ui

import android.content.Intent
import android.os.Bundle
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import com.sharyuke.app.ItemSimple
import com.sharyuke.app.R
import com.sharyuke.app.defaultList

class ViewListActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_view_list)
        title = "列表"
        val list = listOf(
            ItemSimple(R.mipmap.icon_list_page, "布局管理") { startActivity(Intent(this, ViewListLayoutManagerActivity::class.java)) },
            ItemSimple(R.mipmap.icon_list, "简单列表") { startActivity(Intent(this, ViewListBaseActivity::class.java)) },
            ItemSimple(R.mipmap.icon_list_group, "分组列表") { startActivity(Intent(this, ViewListGroupActivity::class.java)) },
            ItemSimple(R.mipmap.icon_list_page, "分页列表") { startActivity(Intent(this, ViewListPagingActivity::class.java)) },
        )
        defaultList(list, findViewById(R.id.view_list_rv))
    }
}